<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import { findIconList } from '@/api/icon.js'
export default {
  name: "App",
  mounted () {
    this.findIconList();
  },
  methods: {
    /**
     * @name findIconList
     * @description 获取icon列表
     * @author cjs1992
     * @date 2020-07-02 09:04:20
     */
    async findIconList () {
      const res = await findIconList();
      let list = res.data || [];
      let str = '';
      for (let item of list) {
        let viewBox = '0 0 200 200';
        if (item.svgSize) {
          viewBox = `0 0 ${item.svgSize} ${item.svgSize}`;
        }
        str += `<symbol xmlns="http://www.w3.org/2000/svg" viewBox="${viewBox}" id='icon-${item.name}'>
              ${item.svgStr}
            </symbol>`;
      }
      str = `<svg xmlns="http://www.w3.org/2000/svg" style="position: absolute; width: 0; height: 0" id="__SVG_SPRITE_NODE__myOwn">
          ${str}
        </svg>`;
        let div = document.createElement('div');
        div.id = 'icon_div_wrap';
        div.setAttribute('style', 'position: absolute;width: 0; height: 0;');
        // div.style.position = 'absolute';
        // div.style.width = '0';
        // div.style.height = '0';
        div.innerHTML = str;
      document.body.insertBefore(div, document.querySelector('#__SVG_SPRITE_NODE__'));
    }
  }
};
</script>
<style lang="scss">
  .left {
    width: 310px;
    padding: 20px 15px;
    position: absolute;
  }
  .right {
    margin-left: 340px;
    min-height: 794px;
    background-color: white;
    padding-left: 10px;
    border-radius: 4px;
  }
// 迎新系统的全局样式
html body {
  // >>> {
    .el-tabs__item {
      height: auto;
      vertical-align: top !important;
    }
  // }
  // 性别容器
  .sexBox {
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #fff;
    line-height: 25px;
    text-align: center;
    background-color: #ff8c8a;
    &.man {
      background-color: #649fff;
    }
  }

  .el-checkbox__inner::after {
    border-width: 2px;
  }
  .el-button--mini.is-round {
    padding: 5px 10px !important;
  }
  .baseBorderRadius {
    border-radius: 5px;
    min-height: calc(100vh - 144px);
  }
  .el-table__header thead tr th {
    background-color: #f5f6fa;
  }
  .el-table {
    .el-table__header {
      .cell {
        color: #344563;
        font-weight: bold;
      }
    }
    td {
      box-sizing: border-box;
      padding: 10px 0;
    }
  }
  // .el-table__header-wrapper > table,
  // .el-table__body-wrapper.is-scrolling-none > table {
  //   width: 100% !important;
  //   overflow: hidden;
  // }
  .el-dialog__body {
    padding-top: 0;
  }
}
.special_switch_wrap {
  // position: absolute;
  // right: 16px;
  // top: 12px;
  position: relative;
  height: 24px;
   .el-switch {
    .el-switch__core {
      width: 56px !important;
      height: 20px;
      // border: 2px solid #fff;
      border-radius: 20px;
      &:after {
        top: 2px;
        left: 3px;
        width: 14px;
        height: 14px;
      }
    }
    &.is-checked {
      .el-switch__core {
        &:after {
          left: 100%;
          margin-left: -19px;
        }
      }
    }
  }
   .el-switch__label * {
    font-size: 12px;
  }
   .el-switch__label--left,
   .el-switch__label--right {
    position: absolute;
    color: #fff;
    z-index: -1111;
    width: 40px;
    top: 0;
  }
   .el-switch__label--left {
    left: 25px;
    text-align: left;
  }
   .el-switch__label--right {
    right: 25px;
    text-align: right;
  }
   .el-switch__label--right.is-active,
   .el-switch__label--left.is-active {
    z-index: 1111;
    color: #fff !important;
  }
}
.dialog-footer {
  text-align: center;
}
.page_box {
  margin-top: 25px;
  text-align: center;
}

/* /全局样式 */
* {
  padding: 0;
  margin: 0;
  border: 0;
}
.clearfix {
  *zoom: 1;
}
.fl {
  float: left;
}
.fr {
  float: right;
}
.clearfix:after {
  display: block;
  clear: both;
  content: " ";
  height: 0;
  visibility: hidden;
}
li {
  list-style-type: none;
}
.cursor {
  cursor: pointer;
}
/* 组件类名 */
.app_container {
  // padding-left: 15px;
  // padding-right: 15px;
  padding: 20px;
  // padding-bottom: 0;
  min-height: calc(100vh - 160px);
}
/*兼容ie 9 的 table 样式*/

table.special_table {
  border-collapse: collapse;
  table-layout: fixed;
}

.special_table th,
.special_table td {
  padding: 14px 0;
  min-width: 0;
  box-sizing: border-box;
  text-overflow: ellipsis;
  vertical-align: middle;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  font-size: 14px;
  color: #5b687f;
  /* border: none; */
  border-bottom: 1px solid #ebeef5;
  text-align: center;
  border-collapse: collapse;
  /*关键代码*/
}
.special_table tbody tr:nth-child(2n-1) {
  // background-color: #f9fafc;
}
.el-tooltip__popper {
  max-width: 450px;
  line-height: 180%;
}
.smallTable_hx_jm th,
.smallTable_hx_jm td {
  padding: 9px 0 !important;
}
.bigTable_hx_jm th,
.bigTable_hx_jm td {
  padding: 16px 0 !important;
}
#special_table_jmzy th,
#special_table_jmzy td {
  padding-bottom: 7px;
  padding-top: 7px;
  white-space: initial;
}
.special_table th {
  font-weight: bold;
}

.special_table thead {
  color: #909399;
  font-weight: 500;
}

.special_table th {
  background-color: #f5f9fb;
  color: #76838f;
  border-collapse: collapse;
}

.special_table thead tr {
  background-color: #fff;
}
.special_table thead tr td {
  color: #344563;
  font-weight: bold;
}
.special_table tr {
  background-color: #fff;
  color: #76838f;
  border-collapse: collapse;
}

.special_table tr:hover {
  transition: background-color 0.25s ease;
}

.special_table tbody tr:hover {
  background: #f9fafc;
}
.special_table .overflowTitle {
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  white-space: nowrap;
}
.special_table .el-button--mini.is-round span {
  font-size: 12px !important;
}
.scroBox .el-scrollbar {
  height: 100%;
}
.scroBox .el-scrollbar__wrap {
  overflow-x: hidden;
}
/*兼容ie 9 的 table 样式*/
.el-loading-mask {
  top: 128px;
  z-index: 999999;
}
.dropdown-menu-special-style .el-scrollbar__wrap {
  max-height: 274px;
}
// 单行省略号
html body .one_line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
// 文件上传预览
.el-image-viewer__btn.el-image-viewer__close .el-icon-circle-close {
  font-size: 36px;
  color: #fff;
}
// 设置宽度
.el-cascader-menu {
  max-width: 200px;
}
#app .hideSidebar .el-submenu > .el-submenu__title {
  padding: 0 !important;
  text-align: center;
}
.one_line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
// 试图统一的背景色  2019-10-14
.baseBgColor {
  background-color: #f2f3f7;
}
.baseContainer {
  padding: 30px;
}
.bgWhite {
  background-color: #fff;
}
.baseColor {
  color: #12ad8a !important;
}
.baseBoderShadow {
  border: 1px solid transparent;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.baseBorderRadius {
  border-radius: 6px;
}
// 按钮
.btnWindth106 {
  width: 106px;
}
.btnYellow {
  background-color: #fea858;
  border-color: #fea858;
}
.btnYellow.el-button--primary:hover,
.btnYellow.el-button--primary:focus {
  background-color: #ff932f;
  border-color: #ff932f;
}
.btnGray {
  background-color: #eceef6;
  border-color: #eceef6;
  color: #344563;
}
.btnGray.el-button--primary:hover,
.btnGray.el-button--primary:focus {
  background-color: #e5e8f3;
  border-color: #e5e8f3;
  color: #344563;
}
.btnGreen {
  background-color: #01d394;
  border-color: #01d394;
  color: #fff;
}
.btnGreen.el-button--primary:hover,
.btnGreen.el-button--primary:focus {
  background-color: #00ca8d;
  border-color: #00ca8d;
  color: #fff;
}
.btnBlue {
  background-color: #6bb1f2;
  border-color: #6bb1f2;
  color: #fff;
}
.btnBlue.el-button--primary:hover,
.btnBlue.el-button--primary:focus {
  background-color: #57a3e9;
  border-color: #57a3e9;
  color: #fff;
}
.btnBlue.el-button--primary.is-disabled,
.el-button--primary.is-disabled:hover,
.btnBlue.el-button--primary.is-disabled:focus,
.el-button--primary.is-disabled:active {
  background-color: #c7cbd9;
  border-color: #c7cbd9;
  color: #fff;
}
.btnCyan {
  background-color: #00cfda;
  border-color: #00cfda;
  color: #fff;
}
.btnCyan.el-button--primary:hover,
.btnCyan.el-button--primary:focus {
  background-color: #00c3cd;
  border-color: #00c3cd;
  color: #fff;
}
.btnDelete {
  background-color: #fff;
  border-color: #eaeaea;
  color: #748095;
}
.btnDelete.el-button--primary:hover,
.btnDelete.el-button--primary:focus {
  background-color: #eceef6;
  border-color: #eaeaea;
  color: #748095;
}
.miniBtn span{
  font-size: 12px!important
}
// 分页更改基本色
.el-pagination.is-background .el-pager li:not(.disabled).active,
.el-pagination.is-background .el-pager li:not(.disabled):hover {
  background-color: #02c58d;
  color: #fff;
}
.el-select .el-input.is-focus .el-input__inner {
  border-color: #02c58d;
}
.el-select-dropdown__item.selected {
  color: #02c58d;
}
//下拉菜单的下拉图标
.el-select .el-icon-arrow-up:before {
  content: "\e78f";
}
.el-input__suffix .el-icon-arrow-down:before {
  content: "\e790";
}
// 全选 复选框的颜色
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: #00d897;
  border-color: #00d897;
}
.el-checkbox__inner:hover,
.el-checkbox__inner:focus {
  border-color: #00d897;
}
/*单选卡去掉label*/
.checkBox .el-radio__input.is-checked .el-radio__inner {
  border-color: #00d797;
  background: #00d797;
}
.checkBox.nonelable .el-radio .el-radio__label {
  display: none;
}
.checkBox .el-radio__input.is-checked + .el-radio__label {
  color: #00d797;
}
/*导出按钮下拉*/
.downLoadBtn {
  position: relative;
}
.downLoadBtn .selectCon {
  position: absolute;
  border: 1px solid #98e5ce;
  border-top: none;
  width: 100%;
  top: 33.5px;
  z-index: 999;
  overflow: hidden;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  cursor: pointer;
  display: none;
}
.downLoadBtn:hover .selectCon {
  display: block;
}
.downLoadBtn .selectCon p {
  line-height: 30px;
  color: #03cc90;
  background: #e8f6f2;
  text-align: center;
}
</style>

